package cate.game.play.buff.h;

import cate.game.play.buff.BuffHandler;
import cate.game.play.config.PlayCfgArgs;
import cate.game.play.fighter.HealResult;
import cate.game.play.proce.action.ctx.SkillActionCtx;

/**
 * 目标受疗时，buff添加者 恢复受疗量100%的生命值，复活吸血、持续恢复的血量不做计算
 */
public class 共免BH extends BuffHandler {

	private double 系数;

	//系数=10000
	@Override
	public void parse(String code) {
		PlayCfgArgs args = new PlayCfgArgs(code);
		系数 = args.getWDouble("系数", 0d);
	}

	@Override
	public void onActiveHealAsTarget(SkillActionCtx action, HealResult healResult) {
		buff.caster.attr.buffHeal(action, action.getActor(), healResult.heal * 系数);
	}
}
